package keyfun.utils 
{
	import flash.geom.Point;
	/**
	 * ...
	 * @author Key Hui
	 */
	public class MathUtil 
	{
		public static function getSlope(p1:Point, p2:Point):Number
		{
			var slope:Number = (p2.y - p1.y) / (p2.x - p1.x);
			
			if (slope == Infinity)
			{
				slope = 9999;
			}
			else if (slope == -Infinity)
			{
				slope = -9999;
			}
			return slope;
		}
		
		public static function randomNumber(low:Number=0, high:Number=1):Number
		{
		  return Math.floor(Math.random() * (1 + high - low)) + low;
		}
		
	}

}